"""
The vardict module contains the function call to return the variables library
The varsearch module contains the procedures needed to handle different variable types
"""

from varsearch import _2darrayval,_singlevalue,_1darrayval

def _getvar(spiceref,variabledict,variablename):

    if variabledict.has_key(variablename):
        """
        We now read the entry in the dictionary
        """
        funcname=variabledict[variablename]
                
        """
        The entry in the dictionary is a function call.
        Now use eval() to evaluate the function
        """
        retval=eval(funcname)
    else:
        # Put in some error info here
        pass
    return retval
